# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[self.callback = callback
self.args = args
self.kwargs = kwargs
self.task = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75f16ec>}
nname: 0
n 0(None)[self.stop()
self.task = notifier.Task(self.callback, *self.args, **self.kwargs)
self.task.start(delay=delay, consider_idle=True)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75f1c4c>}
nname: 53
n 53(None)[]:
	i: 30(), 44(), 51(AE)
	o: 

nname: 51
n 51(None)[]:
	i: 34(f)
	o: 53(AE)

nname: 44
n 44(None)[]:
	i: 34(t)
	o: 53()

nname: 34
n 34(<dummy_ex3> EXC_MATCH ValueError)[]:
	i: 0(except)
	o: 44(t), 51(f)

nname: 30
n 30(None)[]:
	i: 12(), 29()
	o: 53()

nname: 29
n 29(None)[]:
	i: 3(f)
	o: 30()

nname: 12
n 12(None)[self.task.stop()
]:
	i: 3(t)
	o: 30()

nname: 3
n 3(self.task)[]:
	i: 0(try)
	o: 12(t), 29(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 34(except)

nname: 53
n 53(None)[]:
	i: 34(), 0()
	o: 

nname: 34
n 34(None)[except ValueError:
	pass
]:
	i: 0()
	o: 53()

nname: 53
n 53(None)[]:
	i: 34(), 0()
	o: 

nname: 0
n 0(None)[try:
	if self.task:
		self.task.stop()
]:
	i: 
	o: 53(), 34()

self.nodes: {0: <unpyclib.structure.node instance at 0xb75f1b6c>, 34: <unpyclib.structure.node instance at 0xb75f1aec>, 53: <unpyclib.structure.node instance at 0xb75f1e4c>}
nname: 0
n 0(None)[self.args = args
self.kwargs = kwargs
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75f15ac>}
nname: 6
n 6(None)[__doc__ = ' internal api for one shot timer.\n    \n    the goal is to reduce the dependency whith peewee\n    '
def __init__(self, callback, *args, **args):
	self.callback = callback
	self.args = args
	self.kwargs = kwargs
	self.task = None
	return None

def start(self, delay):
	self.stop()
	self.task = notifier.Task(self.callback, *self.args, **self.kwargs)
	self.task.start(delay=delay, consider_idle=True)

def stop(self):
	try:
		if self.task:
			self.task.stop()

def set_args(self, *args, **args):
	self.args = args
	self.kwargs = kwargs

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb75eafcc>}
nname: 139
n 139(None)[]:
	i: 102(), 119(), 138(AE)
	o: 

nname: 119
n 119(None)[log.debug('removeFolder failed')
]:
	i: 0(except)
	o: 139()

nname: 102
n 102(None)[os.rmdir(folder_path)
]:
	i: 3(AL), 101()
	o: 139()

nname: 101
n 101(None)[]:
	i: 21(AF), 84()
	o: 102()

nname: 84
n 84(None)[os.remove(file_path)
]:
	i: 28(f), 70()
	o: 101()

nname: 70
n 70(None)[removeFolder(file_path)
continue
]:
	i: 28(t)
	o: 84()

nname: 28
n 28(os.path.isdir(file_path))[for file in files:
file_path = os.path.join(folder_path, file)
]:
	i: 21(for)
	o: 70(t), 84(f)

nname: 21
n 21(None)[]:
	i: 3(loop)
	o: 28(for), 101(AF)

nname: 3
n 3(None)[files = os.listdir(folder_path)
]:
	i: 0(try)
	o: 21(loop), 102(AL)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 119(except)

nname: 139
n 139(None)[]:
	i: 102(), 119()
	o: 

nname: 119
n 119(None)[except:
	log.debug('removeFolder failed')
]:
	i: 0()
	o: 139()

nname: 102
n 102(None)[os.rmdir(folder_path)
]:
	i: 0(AL), 21(AF), 28()
	o: 139()

nname: 28
n 28(None)[for file in files:
file_path = os.path.join(folder_path, file)
if os.path.isdir(file_path):
	removeFolder(file_path)
	continue
os.remove(file_path)
]:
	i: 21(for)
	o: 102()

nname: 21
n 21(None)[]:
	i: 0(loop)
	o: 28(for), 102(AF)

nname: 0
n 0(None)[try:
	files = os.listdir(folder_path)
]:
	i: 
	o: 21(loop), 102(AL), 119()

self.nodes: {0: <unpyclib.structure.node instance at 0xb75f1a0c>, 139: <unpyclib.structure.node instance at 0xb75f1dec>, 21: <unpyclib.structure.node instance at 0xb75f14ac>, 119: <unpyclib.structure.node instance at 0xb75f1cec>, 28: <unpyclib.structure.node instance at 0xb75f162c>, 102: <unpyclib.structure.node instance at 0xb75f1fcc>}
nname: 0
n 0(None)[from peewee import notifier
from logger import log
from config import *
import os
class WyrecordOnShotTimer(object):
	__doc__ = ' internal api for one shot timer.\n    \n    the goal is to reduce the dependency whith peewee\n    '
	def __init__(self, callback, *args, **args):
		self.callback = callback
		self.args = args
		self.kwargs = kwargs
		self.task = None
		return None

	def start(self, delay):
		self.stop()
		self.task = notifier.Task(self.callback, *self.args, **self.kwargs)
		self.task.start(delay=delay, consider_idle=True)

	def stop(self):
		try:
			if self.task:
				self.task.stop()

	def set_args(self, *args, **args):
		self.args = args
		self.kwargs = kwargs



def removeFolder(folder_path):
	try:
		files = os.listdir(folder_path)

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75ea96c>}
from peewee import notifier
from logger import log
from config import *
import os
class WyrecordOnShotTimer(object):
	__doc__ = ' internal api for one shot timer.\n    \n    the goal is to reduce the dependency whith peewee\n    '
	def __init__(self, callback, *args, **args):
		self.callback = callback
		self.args = args
		self.kwargs = kwargs
		self.task = None
		return None

	def start(self, delay):
		self.stop()
		self.task = notifier.Task(self.callback, *self.args, **self.kwargs)
		self.task.start(delay=delay, consider_idle=True)

	def stop(self):
		try:
			if self.task:
				self.task.stop()

	def set_args(self, *args, **args):
		self.args = args
		self.kwargs = kwargs



def removeFolder(folder_path):
	try:
		files = os.listdir(folder_path)

